package com.crcode.crm.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * 读取配置文件
 * @author cl
 * @date 2018年8月27日 上午10:28:26
 */
public class ConfigUtil extends Properties {
	private static final long serialVersionUID = 1L;
	private static ConfigUtil config = null;
	private ConfigUtil(){
		InputStream is = getClass().getResourceAsStream("/config.properties");
		try {
			this.load(is);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static synchronized ConfigUtil getInstance(){
		if(config ==null){
			config = new ConfigUtil();
		}
		
		return config;
	}
}
